package com.shengde.jinwawaforleader.model.myJob.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.shengde.jinwawaforleader.base.BaseV4Fragment;
import com.shengde.jinwawaforleader.model.myJob.classList.ClassListActivity;

import java.util.ArrayList;

/**
 * Created by Chason on 2016/9/8.
 */

public class TabPageIndicatorAdapter extends FragmentPagerAdapter {
    private ClassListActivity activity;
    private ArrayList<BaseV4Fragment> mList;
    public TabPageIndicatorAdapter(FragmentManager fm , ClassListActivity activity , ArrayList<BaseV4Fragment> mList) {
        super(fm);
        this.activity = activity;
        this.mList = mList;
    }

    @Override
    public Fragment getItem(int position) {
        return mList.get(position);
    }

    @Override
    public int getCount() {
        return activity.TITLE.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return activity.TITLE[position];
    }
}